<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;


class Accounting extends Model
{
	
	const LOCK_SMALL_SCALE_TAXPAYER = 1;//小规模纳税人
	const LOCK_GENERAL_TAXPAYER = 2;//一般规模纳税人
	
	const LOCK_ACCOUNTING_STANDARDS = 1;//企业会计准则
	const LOCK_ACCOUNTING_STANDARDS_SMALL = 2;//小企业会计准则	
	
	const LOCK_SMALL_SCALE_TAXPAYER_STRING = '小规模纳税人';//小规模纳税人
	const LOCK_GENERAL_TAXPAYER_STRING = '一般规模纳税人';//一般规模纳税人

	const LOCK_ACCOUNTING_STANDARDS_STRING = '企业会计准则';//企业会计准则
	const LOCK_ACCOUNTING_STANDARDS_SMALL_STRING = '小企业会计准则';//小企业会计准则
	
	
	protected $table = 'cpa_accounting_book';
	protected $primaryKey = 'id';
	
	protected $fillable = [
			'id', 'customer_info_id','taxpayer_property_id','accounting_system_id','del_flag','create_date'
	];
    
	public function agent(){
		return $this->hasOne(Agent::class,'id');//,'at_enterprise_info_id');
	}
	
	
	public static function getLockTaxesDisplayMap()
	{
		return [
				self::LOCK_SMALL_SCALE_TAXPAYER => self::LOCK_SMALL_SCALE_TAXPAYER_STRING,
				self::LOCK_GENERAL_TAXPAYER => self::LOCK_GENERAL_TAXPAYER_STRING,
		];
	}
	
	public static function getLockAccountDisplayMap()
	{
		return [
				self::LOCK_ACCOUNTING_STANDARDS => self::LOCK_ACCOUNTING_STANDARDS_STRING,
				self::LOCK_ACCOUNTING_STANDARDS_SMALL => self::LOCK_ACCOUNTING_STANDARDS_SMALL_STRING,
		];
	}
	
}
